﻿using System;
using System.Web;

namespace NWebMock
{
    public class HttpCacheVaryByHeadersWrapper : IHttpCacheVaryByHeaders
    {
        #region Constructors

        public HttpCacheVaryByHeadersWrapper(HttpCacheVaryByHeaders innerVaryByHeaders)
        {
            if (innerVaryByHeaders == null)
            {
                throw new ArgumentNullException("innerVaryByHeaders");
            }

            this.innerVaryByHeaders = innerVaryByHeaders;
        }

        #endregion

        #region Fields

        private HttpCacheVaryByHeaders innerVaryByHeaders = null;

        #endregion

        #region Properties

        public bool AcceptTypes { get { return this.innerVaryByHeaders.AcceptTypes; } set { this.innerVaryByHeaders.AcceptTypes = value; } }

        public bool this[string header] { get { return this.innerVaryByHeaders[header]; } set { this.innerVaryByHeaders[header] = value; } }

        public bool UserAgent { get { return this.innerVaryByHeaders.UserAgent; } set { this.innerVaryByHeaders.UserAgent = value; } }

        public bool UserCharSet { get { return this.innerVaryByHeaders.UserCharSet; } set { this.innerVaryByHeaders.UserCharSet = value; } }

        public bool UserLanguage { get { return this.innerVaryByHeaders.UserLanguage; } set { this.innerVaryByHeaders.UserLanguage = value; } }

        #endregion

        #region Methods

        public void VaryByUnspecifiedParameters()
        {
            this.innerVaryByHeaders.VaryByUnspecifiedParameters();
        }

        #endregion
    }
}
